<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">工程负责人前期费信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">工程负责人</td><td id="gofuer" class="tv"></td><td class="tt">前期费收入(元)</td><td id="ban_shou_fee" class="tv colorlan"></td></tr>
                <tr><td class="tt">前期费支出(元)</td><td id="ban_zhi_fee" class="tv colorlan"></td><td class="tt">投标保证金缴纳(元)</td><td id="tou_jiao_fee" class="tv colorlan"></td></tr>
                <tr><td class="tt">投标保证金返还(元)</td><td id="tou_fan_fee" class="tv colorlan"></td><td class="tt">工程负责人前期费余额(元)</td><td id="ban_yu_fee" class="tv"></td></tr>
                </tbody>
            </table>
        </div>

        <div class="table-box tablenes">
            <div class="title">本次收取信息</div>
            <table class="layui-table">
                <tbody>

                <tr><td class="tt">款项摘要</td><td id="zhai" class="tv"></td><td class="tt">到账金额(元)</td><td id="money" class="tv"></td></tr>
                <tr><td class="tt">收款对象</td><td id="duier" class="tv"></td><td class="tt">到账方式</td><td id="incdaotype_name" class="tv"></td></tr>
                <tr><td class="tt">到账账户</td><td id="accid_name" class="tv"></td><td class="tt">到账日期</td><td class="tv" id="dt"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>


        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo">款项明细</script>
            <div class="tableShow">
                <table id="datalist" lay-filter="datalist"></table>
            </div>
        </div>

        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;



    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_qian_ban_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var gofuerinfo = res.data.gofuerinfo;
                var account = res.data.account;

                if(gofuerinfo){
                    $('#ban_shou_fee').text(parseFormatNum(gofuerinfo.ban_count.ban_shou_fee)).click(function () {
                        openNavPage('前期费收取-办事处','qian_ban/index.php?status=1&gofuer='+encodeURIComponent(gofuerinfo.name));
                    })
                    $('#ban_zhi_fee').text(parseFormatNum(gofuerinfo.ban_count.ban_zhi_fee)).click(function () {
                        openNavPage('前期费支付','qian_zhi/index.php?status=1&gofuer='+encodeURIComponent(gofuerinfo.name)+'&jinglei='+encodeURIComponent('办事处'));
                    })
                    $('#tou_jiao_fee').text(parseFormatNum(gofuerinfo.ban_count.tou_jiao_fee)).click(function () {
                        openNavPage('投标保证金缴纳','tou_jiao/index.php?status=1&ziqu=1&gofuer='+encodeURIComponent(gofuerinfo.name)+'&jinglei='+encodeURIComponent('办事处'));
                    })
                    $('#tou_fan_fee').text(parseFormatNum(gofuerinfo.ban_count.tou_fan_fee)).click(function () {
                        openNavPage('投标保证金返还','tou_fan/index.php?status=1&ziqu=1&gofuer='+encodeURIComponent(gofuerinfo.name)+'&jinglei='+encodeURIComponent('办事处'));
                    })
                    $('#ban_yu_fee').text(parseFormatNum(gofuerinfo.ban_count.ban_yu_fee));
                }

                if(account){
                    $('#accid_name').text(account.name+'('+account.accnum+')').click(function () {
                        openPage('../account/show.php?id='+account.id);
                    });
                }



                $("#gofuer").text(data.gofuer);
                $("#zhai").text(data.zhai);
                $("#duier").text(data.duier);
                $('#money').text(parseFormatNum(data.money));
                $("#incdaotype_name").text(data.incdaotype_name);
                $("#dt").text(data.dt);
                $("#explain").text(data.explain);
                // $(".pageshowtitle").text('前期费收取');


                var mytableList = table.render({
                    elem: "#datalist",data:res.data.list, toolbar: '#toolbarDemo', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号'}
                        ,{field: 'shouqianlei_name', title: '款项类型'}
                        ,{field:'money',title:'金额(元)',templet: function(d){
                                return parseFormatNum(d.money);
                            }}
                        ,{field: 'explain', title: '款项说明'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });



                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('qian_ban', param_id);
    });



</script>
</body>
</html>




